package com.yebxxx;

import com.rabbitmq.client.AMQP;
import com.yebxxx.server.pojo.MailConstance;
import com.yebxxx.server.service.ISysMsgService;
import com.yebxxx.server.service.TeacherService;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.amqp.core.Queue;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling;

@SpringBootApplication
@MapperScan("com.yebxxx.server.mapper")
@EnableScheduling       //定时器开关
public class DemoApplication {

    public static void main(String[] args) {
        SpringApplication.run(DemoApplication.class, args);

    }
    @Bean
    public Queue queue(){
       return  new Queue(MailConstance.MAIL_QUEUE_NAME);

    }

}
